\ProvidesPackage{zwfh}
\usepackage{tikz,amsmath,xcolor,ifthen}
%\usepackage{tikz}
\usetikzlibrary{tikzmark}
%%%自定义公式导引线
\makeatletter
\def\maketag@@@#1{\hbox{%
		\m@th\normalfont
		\tikzmark{\the\c@eqn@dotfill-2}%
		\iftikzmark{\the\c@eqn@dotfill-1}{%
			\tikz[remember picture, overlay]
			\draw[line width=1.4pt,line cap=round, dash pattern=on 0pt off 
			4.6pt] ([xshift=2mm,yshift=0.3em]pic cs:\the\c@eqn@dotfill-1) -- 
			([xshift=-2mm,yshift=0.3em]pic cs:\the\c@eqn@dotfill-2);%
		}{}%
		#1}}

\newcounter{eqn@dotfill}
\newcommand\markDotfill{%
	\stepcounter{eqn@dotfill}%
	\tikzmark{\the\c@eqn@dotfill-1}
}
\makeatother

%公式环境里自动生成评分细则的导引线\dyx{阿拉伯数字}
\newcommand{\dyx}[1]{\markDotfill\tag*{#1分}}

%非公式环境里导引线重新设置更加美观
\def\cds{\leavevmode\leaders\hbox to 0.45em{\hfil\large$\cdot$\hfil}
	\hfill\kern0.3em}


	
	%平行 	
	\newcommand\pxx{%               
		\mathrel{\text{\tikz[baseline] \draw (0em,-0.3ex) -- (.4em,1.7ex) (.2em,-0.3ex) -- (.6em,1.7ex);}%
	}}
	
	%平行且等于	
	\newcommand*\pxqdy{%               
		\mathrel{\hspace{.03555em}\text{\tikz[baseline]
				\draw (.1em,0ex) -- (.9em,0ex)
				(.1em,-.25ex) -- (.9em,-.25ex)
				(.375em,.1ex) -- (.675em,1.5ex)
				(.525em,.1ex) -- (.825em,1.5ex);}\hspace{.03555em}%
	}}
	
	%新的平行且等于
	\newcommand*\pxdy{%               
		\mathrel{\hspace{.03555em}\text{\tikz[baseline]
				\draw (.1em,0ex) -- (.9em,0ex)
				(.1em,.3ex) -- (.9em,.3ex)
				(.375em,.4ex) -- (.675em,1.8ex)
				(.55em,.4ex) -- (.85em,1.8ex);}\hspace{.03555em}}%
	}	
	
	
	%相似 
	\newcommand*\xiangs{%                                       
		\mathrel{\text{%
				\tikz \draw[baseline] (-.25em,1.15ex) .. controls (-.55em,1.15ex) and (-.51em,.23ex) .. (-.275em,.23ex) .. controls (0,.23ex) and (0,1.15ex) .. (.275em,1.15ex) .. controls (.51em,1.15ex) and (.55em,.23ex) .. (.25em,.23ex);%
	}}}
	
	%全等 
	\newcommand*\quand{%                                       
		\mathrel{\text{%\small%
				\tikz \draw[baseline] (-.2em,1.35ex) .. controls (-.46em,1.6ex) and (-.54em,.65ex) .. (-.25em,.65ex) .. controls (-.06em,.65ex) and (.06em,1.35ex) .. (.25em,1.35ex) .. controls (.54em,1.35ex) and (.46em,.4ex) .. (.2em,.65ex) (-.46em,.4ex) -- (.46em,.4ex) (-.46em,0ex) -- (.46em,0ex);%
	}}}
	
	
	
	
	%中文真子集 	
	\newcommand*\zhziji{%               
		\mathrel{\text{\tikz
				\draw[baseline] (.6636em,1.57ex) -- (.192em,1.57ex) arc (90:270:0.4022ex) -- (.6636em,.7674ex) (0,.2558ex) -- (.6636em,.2558ex) (0,.5116ex) -- (.6636em,.5116ex) (.2323em,0ex) -- (.4313em,.7674ex);%
		}}%
	}
	
	%中文子集
	\newcommand*\ziji{%                    
		\mathrel{\text{\raisebox{.15ex}{\tikz
					\draw[baseline] (.6636em,1.57ex) -- (.20235em,1.57ex) arc (90:270:0.4797ex) -- (.6636em,.61ex) (0,.305ex) -- (.6636em,.305ex);%
		}}}%
	}	
	
	
	
	
	
	
	%中文反向子集 	
	\newcommand*\zijif{%                    
		\mathrel{\text{\raisebox{.15ex}{\tikz
					\draw[baseline] (-.6636em,1.57ex) -- (-.20235em,1.57ex) arc (90:-90:0.4797ex) -- (-.6636em,.61ex) (-.6636em,.305ex) -- (0,.305ex);%
		}}}%
	}
	
	%中文反向真子集	
	\newcommand*\zhzijif{%               
		\mathrel{\text{\tikz
				\draw[baseline] (-.6636em,1.57ex) -- (-.192em,1.57ex) arc (90:-90:0.4022ex) -- (-.6636em,.7674ex) (0,.2558ex) -- (-.6636em,.2558ex) (0,.5116ex) -- (-.6636em,.5116ex) (-.4313em,0ex) -- (-.2323em,.7674ex);%
		}}%
	}
	
	
	%平行四边形  
	\newcommand*\pxsbx{%          
		\mathord{\text{%
				\tikz[baseline]
				\draw (0,.1ex) -- (.8em,.1ex) -- (1em,1.4ex) -- (.2em,1.4ex) -- cycle;}}}

%求补集 complement
\newcommand*\zhcom{%            
	\mathord{\text{%
			\tikz[baseline,thick,rounded corners=0.12ex,line cap=round]
			\draw (0.138em,0.26ex) -- (0.138em,0) -- (0,0) -- (0,1.57ex) -- (0.138em,1.57ex) -- (0.138em,1.31ex);}}}


%选择题的4个选项，使用一个命令根据选项内容长度自动排版
\newlength{\lab}
\newlength{\lb}
\newlength{\lc}
\newlength{\ld}
\newlength{\lhalf}
\newlength{\lquarter}
\newlength{\lmax}
\newcommand{\xx}[4]{\mbox{}\\[.5pt]%
	\settowidth{\lab}{A.~#1~~~}
	\settowidth{\lb}{B.~#2~~~}
	\settowidth{\lc}{C.~#3~~~}
	\settowidth{\ld}{D.~#4~~~}
	\ifthenelse{\lengthtest{\lab > \lb}}  {\setlength{\lmax}{\lab}}  {\setlength{\lmax}{\lb}}
	\ifthenelse{\lengthtest{\lmax < \lc}}  {\setlength{\lmax}{\lc}}  {}
	\ifthenelse{\lengthtest{\lmax < \ld}}  {\setlength{\lmax}{\ld}}  {}
	\setlength{\lhalf}{0.5\linewidth}
	\setlength{\lquarter}{0.25\linewidth}
	\ifthenelse{\lengthtest{\lmax > \lhalf}}  {\noindent{}A.~#1 \\ B.~#2 \\ C.~#3 \\ D.~#4 }  {
		\ifthenelse{\lengthtest{\lmax > \lquarter}}  {\noindent\makebox[\lhalf][l]{A.~#1~~~}%
			\makebox[\lhalf][l]{B.~#2~~~}\\%
			\makebox[\lhalf][l]{C.~#3~~~}%
			\makebox[\lhalf][l]{D.~#4~~~}}%
		{\noindent\makebox[\lquarter][l]{A.~#1~~~}%
			\makebox[\lquarter][l]{B.~#2~~~}%
			\makebox[\lquarter][l]{C.~#3~~~}%
			\makebox[\lquarter][l]{D.~#4~~~}}}}


%带圈数字
\makeatletter
\newcommand{\hqs@i}[1]
{\raisebox{-0.56ex}{\begin{tikzpicture}
		\fill(0,0) circle(1.05ex);
		\node(c)[white] at(0,0){\scalebox{0.84}{\textbf{#1}}};
		\end{tikzpicture}}}
\newcommand{\hqs@ii}[2]
{\raisebox{-0.56ex}{\begin{tikzpicture}
		\fill(0,0) circle(1.05ex);
		\node(c)[white] at(0,0){\scalebox{0.8}{\makebox[0.5em]{\textbf{#1\hspace{-0.10ex}#2}}}};
		\end{tikzpicture}}}
\newcommand{\hqs}[1]{%
	\@ifnextchar\bgroup
	{\hqs@ii{#1}}{\hqs@i{#1}}
}


\newcommand{\qs@i}[1]
{\raisebox{-0.66ex}{\begin{tikzpicture}[line width=0.35]
		\draw(0,0) circle(0.999ex);
		\node(c) at(0,0){\scalebox{0.9}{\makebox[0.5em]{#1}}};
		\end{tikzpicture}}}
\newcommand{\qs@ii}[2]
{\raisebox{-0.58ex}{\begin{tikzpicture}[line width=0.35]
		\draw(0,0) circle(0.999ex);
		\node(c) at(0,0){\scalebox{0.76}{\makebox[0.5em]
				{#1\hspace*{-0.16ex}#2}}};
		\end{tikzpicture}}}

\newcommand{\qs}[1]{%
	\@ifnextchar\bgroup
	{\qs@ii{#1}}{\qs@i{#1}}
}

%% 自定义圆弧符号
\DeclareSymbolFont{ugmL}{OMX}{mdugm}{m}{n}
\DeclareMathAccent{\yhu}{\mathord}{ugmL}{"F3}

\endinput
